<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
    
<style>
    a{
        float: left;
        display: block;
        background-color: black;
        color: rgb(253, 249, 249);
        margin-right: 10px;
        width: 40px;
        height: 40px;
        border-radius: 5px;
        line-height: 40px;
        text-align: center;
        text-decoration: none;
    }
    /* a[id] a标签中含有id的元素 */
    /* a[id=id] a标签中id=id的元素 */
    /* a[class="w e r"] a标签中class="w e r"的元素 */
    /* =绝对等于 */
    /* *=包含 */
    /* ^=以这个开头 */
    /* $=以这个结尾 */
    a[id='id']{
        background-color: blue;
    }
    a[class="w e r"]{
        background-color: brown;
    }
</style>
<body>
    <p>
        <a href="hh/dhfdhdk" class="w e r" id="id">1</a>
         <a href="hhhfhdsjkjs" class="w e r">2</a>
         <a href="fh.dom">3</a>
         <a href="fj.pt">4</a>
    </p>
</body>
</html>